<div class="modal-dialog modal-md">
    <form id="ajaxForm" method="post" class="form-horizontal" action="/admin/neiqin/zhipai" data-validate="parsley">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal">&times;</button>
            <h4 class="modal-title">{{controller.meta_title}}</h4>
        </div>
        <div class="modal-body">

                <div class="form-group m-b-none">
                    <label>指定业务员： </label>
                    <td><input type="text" style="display: none" id="mobile" class=" input-sm form-control" placeholder="请填写业务员手机号码。" name="phone" data-required="true"></td>
                    <input type="hidden" value="{{id}}" name="id">
                    <div id="treeview-selectable" class=""></div>
                </div>

        </div>
        <div class="modal-footer">
            <a href="javascript:;" class="btn btn-default" data-dismiss="modal">关闭</a>
            <a href="javascript:;" class="btn btn-primary btn-s-md ajax-post" type="submit" target-form="form-horizontal">确定</a>
        </div>
    </div><!-- /.modal-content -->
    </form>
    <script src="/static/admin/js/bootstrap-treeview/js/bootstrap-treeview.js" type="text/javascript"></script>
    <script type="text/javascript">
        var initSelectableTree = function() {
          return $('#treeview-selectable').treeview({
            data: {{treeviewData|safe}},
            onNodeSelected: function(event, node) {
                if(node.mobile){
                    $("#mobile").val(node.mobile); 
                }else{
                    $("#mobile").val(''); 
                } 
            }
          });
        };
        var $selectableTree = initSelectableTree();
    </script>
</div><!-- /.modal-dialog -->